package org.chen.flight.feign;

import org.chen.common.email.dto.EmailConfigDTO;
import org.chen.common.flight.dto.FlightApiConfigDTO;
import org.chen.common.result.ResultVO;
import org.chen.common.email.request.EmailNotificationRequest;
import org.chen.flight.feign.fallback.SystemFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "data-system" , fallback = SystemFeignFallback.class)
public interface SystemClient {
    @GetMapping("/api-config")
    ResultVO<FlightApiConfigDTO> getFlightApiConfig();

    @GetMapping("/email-config")
    ResultVO<EmailConfigDTO> getEmailConfig();

    @PostMapping("/send-email")
    Boolean sendEmailNotification(@RequestBody EmailNotificationRequest request);
}
